<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../vue.js"></script>
    <style>
        .v-enter,.v-leave-to{
            opacity: 0
        }
        .v-enter-active,.v-leave-active{
            transition: opacity 3s;
        }
    </style>
</head>
<body>
    <div id="root">
        <transition-group>
            <div v-for="item of list" v-bind:key="item.id">
                {{item.id}} -- {{item.title}}
            </div>
        </transition-group>

        <button @click="handleBtnClick">Add</button>
    </div>

    <script>
        var count  = 0;
        var vm = new Vue({
            el:"#root",
            data:{
                list: []
            },
            methods:{
                handleBtnClick:function () {
                    this.list.push({
                        id: count++,
                        title:"hello world"
                    })
                }
            }
        })
    </script>

</body>
</html>